

$(async function (){
   
    let id =new URLSearchParams(location.search).get('id')
console.log(id);

if(id){
    let res = await axios.get(`${host}/blogs/${id}`)
    // console.log(res);
    
    let obj =res.data.data

    $('[name=title]').val(obj.title)
    $('[name=author]').val(obj.author)
}
   
    
})